<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Tags extends Model
{
    use SoftDeletes;
    protected $table = 'tags';
    

    public function one($id){
    	return $this->where("id", $id)->get()->toArray();
    }

    public function listinfo($where){
    	return $this->where($where)->paginate(10);
    }

    public function deleteone($id){
    	return $this->where(array('id'=>$id))->delete();
    }

    public function users(){
        return $this->belongsTo("App\User", "opertion_user_id", "id");  
    }
}
